//
//  HEIMMessageCell.h
//  HealthFamily
//
//  Created by 吴欧 on 2020/11/27.
//  Copyright © 2020 honglutec. All rights reserved.
//

#import "MCTableBaseCell.h"
#import "HEIMMessageModel.h"

NS_ASSUME_NONNULL_BEGIN

@protocol HEIMMessageCellDelegate <NSObject>

- (void)onTapMessage:(HEIMMessage *)message;

- (void)onTapAvatar:(HEIMMessage *)message;

- (void)onLongPressAvatar:(HEIMMessage *)message;

- (void)refreshTable:(HEIMMessage *)message;

- (void)refreshTable:(HEIMMessage *)message indexPath:(NSIndexPath *)indexPath;

@end



@interface HEIMMessageCell : MCTableBaseCell

/// 姓名
@property (nonatomic, strong) UILabel *nameLabel;

/// 用户头像
@property(nonatomic, strong) UIImageView *userHeadView;

/// 内容区域
@property(nonatomic, strong) UIView *bubbleView;

/// 重试
@property (nonatomic, strong) UIButton *retryButton;

/// 发送loading
@property (nonatomic, strong) UIActivityIndicatorView *traningActivityIndicator;

@property (nonatomic, weak) id<HEIMMessageCellDelegate> delegate;

@property(nonatomic, strong) HEIMMessageModel *model;


- (void)refreshData:(HEIMMessageModel *)data;

- (void)updateLayoutSubViews;

- (void)makeGesture;

@end

NS_ASSUME_NONNULL_END
